feat: Add openRouterBaseUrl option #555
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I encountered the same issue in Roo-Code as described in Cline cline/cline#1336. The problem was resolved through cline/cline#1397, so I applied @luohy15's changes from Cline to Roo Code.
Additionally, it allows using Cloudflare AI Gateway to access OpenRouter requests, enabling more detailed logging and other features.
Type of change
How Has This Been Tested?
I built Roo-Code locally and tested OpenRouter requests with Cloudflare AI Gateway. The requests were successful without any errors. After testing, I can confirm this solution effectively resolves the issue.
Checklist:
Additional context
Related Issues
Reviewers
Important
Adds
openRouterBaseUrloption for customizable API base URL in OpenRouter integration, with updates to configuration, UI, and testing.openRouterBaseUrloption toOpenRouterHandlerinopenrouter.tsfor customizable API base URL.ClineProviderto handleopenRouterBaseUrlin global state and API configuration.ApiOptions.tsxfor settingopenRouterBaseUrl.ApiHandlerOptionsinapi.tsto includeopenRouterBaseUrl.ClineProviderto manageopenRouterBaseUrlin global state.ApiOptions.tsxforopenRouterBaseUrlinput.This description was created by
for 304f5a0979ededd1de997f43522006611929cde1. It will automatically update as commits are pushed.